package components;

public class BasalProfile {	
	private String name;
	private int rate12amTo4am;
	private int rate4amTo6am;
	private int rate6amTo10am;
	private int rate10amTo12am;
	
	public BasalProfile(String name, int rate12amTo4am, int rate4amTo6am, int rate6amTo10am, int rate10amTo12am) {
		this.name = name;
		this.rate12amTo4am = rate12amTo4am;
		this.rate4amTo6am = rate4amTo6am;
		this.rate6amTo10am = rate6amTo10am;
		this.rate10amTo12am = rate10amTo12am;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + rate10amTo12am;
		result = prime * result + rate12amTo4am;
		result = prime * result + rate4amTo6am;
		result = prime * result + rate6amTo10am;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BasalProfile other = (BasalProfile) obj;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (rate10amTo12am != other.rate10amTo12am)
			return false;
		if (rate12amTo4am != other.rate12amTo4am)
			return false;
		if (rate4amTo6am != other.rate4amTo6am)
			return false;
		if (rate6amTo10am != other.rate6amTo10am)
			return false;
		return true;
	}


	// Getters
	public String getName() {
		return name;
	}

	public int getRate12amTo4am() {
		return rate12amTo4am;
	}

	public int getRate4amTo6am() {
		return rate4amTo6am;
	}

	public int getRate6amTo10am() {
		return rate6amTo10am;
	}

	public int getRate10amTo12am() {
		return rate10amTo12am;
	}
}
